<?php
class controller_Chat extends base_module
{
    protected $Chat;

    public function __construct()
    {
        $this->Chat = RpcClient::instance("Chat");
        parent::__construct();
    }
    public function roomslist()
    {
        echo json_encode($this->Chat->roomsList());
    }
    public function sendredenvelopes()
    {
        echo json_encode($this->Chat->sendRedEnvelopes($this->paras));
    }
    public function grabredenvelopes()
    {
        echo json_encode($this->Chat->grabRedEnvelopes($this->paras));
    }
    public function say()
    {
        echo json_encode($this->Chat->roomSay($this->paras));
    }
}